#ifndef DOWNFILE_H
#define DOWNFILE_H

#include <QObject>
#include <QNetworkAccessManager>
#include <QFile>
#include <QNetworkReply>
#include <QFileInfo>
#include <QThread>
class downfile : public QObject
{
    Q_OBJECT
public:
    explicit downfile(QObject *parent = nullptr);
    QString GetTTSFile(QString tpye);
private:
    /* 网络管理 */
    QNetworkAccessManager *networkAccessManager;

    QFile *DownFile;
    const QString ARMAddr = "/bishe/yuyin/car_id.wav";
    const QString UbantuAddr = "/home/lfl/Linux/bishe/QT/yuyin/car_id.wav";
private slots:
    /* 读取数据 */
    void readyReadData();

    /* 响应完成处理 */
    void replyFinished();

    void startDownload(QString url);

    void downfileflag(qint64, qint64);
signals:
    void FileDownReady(QString);
};

#endif // DOWNFILE_H
